/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
// eslint-disable-next-line @nx/enforce-module-boundaries
import viteGlobalExtensions from '../vite-extensions/vite-global-extensions';

export default defineConfig({
	cacheDir: '../../../node_modules/.vite/nx-extensions',

	plugins: [nxViteTsPaths(), ...viteGlobalExtensions],

	test: {
		globals: true,
		cache: {
			dir: '../../../node_modules/.vitest',
		},
		environment: 'node',
		include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
		reporters: ['default'],
	},
});
